[__FreeBSD_version >= 500042]: Define as -znocombreloc because
ld's default is incompatible with unexec.
#define POSIX_SIGNALS 1
+/* The `combreloc' setting became the default, and it seems to be
+ incompatible with unexec. Symptom is an immediate SEGV in
+ XtInitializeWidget when starting Emacs under X11. */
+
+#if defined __FreeBSD_version && __FreeBSD_version >= 500042
+#define LD_SWITCH_SYSTEM_TEMACS -znocombreloc
+#endif
+
/* arch-tag: 426529ca-b7c4-448f-b10a-d4dcdc9c78eb
(do not change this comment) */